/PROG  PNS0013
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "P0225161";
PROG_SIZE	= 3322;
CREATE		= DATE 22-08-25  TIME 08:37:22;
MODIFIED	= DATE 25-07-04  TIME 14:01:00;
FILE_NAME	= PNS0070;
VERSION		= 0;
LINE_COUNT	= 115;
MEMORY_SIZE	= 3806;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R45 ;
   6:  !  PROGRAM: PNS0005 ;
   7:  !  PART:51906028  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  !INITIATE TO PICK-POUNCE ;
  24:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  25:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  26:  PAUSE ;
  27:  R[1:CYCLE TOTAL]=0    ;
  28:  TIMER[1]=RESET ;
  29:  TIMER[1]=START ;
  30:   ;
  31:  LBL[10:TOP OF LOOF] ;
  32:  OVERRIDE=R[5:SPEED/SuDu] ;
  33:   ;
  34:  TIMER[3]=STOP ;
  35:  TIMER[2]=STOP ;
  36:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  37:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  38:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  39:  R[8:R MOVE TIME]=TIMER[3]    ;
  40:  TIMER[2]=RESET ;
  41:  TIMER[2]=START ;
  42:  TIMER[3]=RESET ;
  43:   ;
  44:  !PROCEED TO PICK ;
  45:  LBL[20] ;
  46:  IF DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON,JMP LBL[25] ;
  47:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  48:  JMP LBL[20] ;
  49:   ;
  50:  LBL[25] ;
  51:  WAIT DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON    ;
  52:  TIMER[3]=START ;
  53:  OVERRIDE=R[5:SPEED/SuDu] ;
  54:J P[3:PICK APPROACH] 100% CNT60 ACC100    ;
  55:   ;
  56:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  57:  PAYLOAD[4] ;
  58:  CALL CHK_PICK    ;
  59:  MONITOR Z_CHECH ;
  60:J P[5:PICK DEPART] 100% CNT80 ACC100 TA R[20]sec,DO[5:TO R34 DROP START]=PULSE,1.0sec    ;
  61:  DO[8:P4 PARTS OUT]=PULSE,1.0sec ;
  62:  LBL[27] ;
  63:  CALL CHECKPICK    ;
  64:  IF DI[9:VACUUM ONL]=OFF OR DI[11:VACUUM ONR]=OFF,JMP LBL[27] ;
  65:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  66:  LBL[30:GOTO DROP POUNCE] ;
  67:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  68:  TIMER[3]=STOP ;
  69:  LBL[40:AT DROP POUNCE] ;
  70:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  71:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P5 DROP ENTRY]=ON,JMP LBL[50] ;
  72:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  73:  JMP LBL[40] ;
  74:   ;
  75:  LBL[50:MOVE DROP SNEAK] ;
  76:  TIMER[3]=START ;
  77:  OVERRIDE=R[5:SPEED/SuDu] ;
  78:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  79:  LBL[51:DROP OR C-P-S] ;
  80:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  81:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  82:  JMP LBL[51] ;
  83:  JMP LBL[50] ;
  84:   ;
  85:  LBL[60:MOVE CLS-PRS-ACC] ;
  86:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  87:  PAUSE ;
  88:  JMP LBL[30] ;
  89:   ;
  90:  LBL[80:DROP ENABLED] ;
  91:  TIMER[3]=START ;
  92:  !PROCEED TO DROP ;
  93:  OVERRIDE=R[5:SPEED/SuDu] ;
  94:J P[10:DROP APPROACH] 100% CNT20 ACC100    ;
  95:  MONITOR END Z_CHECH ;
  96:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
  97:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
  98:  PAYLOAD[3] ;
  99:  CALL CHK_DROP    ;
 100:   ;
 101:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 102:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 103:  !GOTO PICK POUNCE ;
 104:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 105:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 106:  JMP LBL[10] ;
 107:   ;
 108:  LBL[90:END OF CYCLE] ;
 109:  TIMER[1]=STOP ;
 110:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 111:  MONITOR END MON_PICK ;
 112:J P[1:MIDDLE] 50% CNT100    ;
 113:  MOVE TO HOME    ;
 114:   ;
 115:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z = -1301.422  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2142.352  mm,	Y =  1550.683  mm,	Z =  -999.883  mm,
	W =   179.978 deg,	P =      .538 deg,	R =   145.217 deg,
	E1=   140.463 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2616.860  mm,	Y =  3253.549  mm,	Z = -1010.673  mm,
	W =  -179.312 deg,	P =      .708 deg,	R =    91.627 deg,
	E1=   194.023 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2616.860  mm,	Y =  3253.549  mm,	Z = -1129.074  mm,
	W =  -179.312 deg,	P =      .708 deg,	R =    91.627 deg,
	E1=   194.023 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2616.860  mm,	Y =  3253.548  mm,	Z =  -885.234  mm,
	W =  -179.312 deg,	P =      .708 deg,	R =    91.627 deg,
	E1=   194.023 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2193.587  mm,	Y =  1821.765  mm,	Z =  -849.916  mm,
	W =   179.887 deg,	P =      .473 deg,	R =   138.521 deg,
	E1=   147.151 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2051.958  mm,	Y =  -850.296  mm,	Z =  -873.991  mm,
	W =  -178.951 deg,	P =      .050 deg,	R =  -161.857 deg,
	E1=    87.525 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2312.252  mm,	Y = -2372.504  mm,	Z =  -865.468  mm,
	W =  -179.301 deg,	P =    -1.054 deg,	R =  -124.726 deg,
	E1=    50.564 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2650.957  mm,	Y = -3324.279  mm,	Z =  -885.775  mm,
	W =   179.934 deg,	P =    -2.195 deg,	R =   -89.960 deg,
	E1=    15.945 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2647.825  mm,	Y = -3324.329  mm,	Z = -1106.800  mm,
	W =   179.934 deg,	P =    -2.195 deg,	R =   -89.960 deg,
	E1=    15.945 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2650.957  mm,	Y = -3324.279  mm,	Z =  -911.855  mm,
	W =   179.934 deg,	P =    -2.195 deg,	R =   -89.960 deg,
	E1=    15.945 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2148.927  mm,	Y = -1583.981  mm,	Z =  -955.389  mm,
	W =  -178.917 deg,	P =     -.285 deg,	R =  -144.494 deg,
	E1=    70.215 deg
};
/END
